home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 334 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: sargas.omicron.se!elias
  2. From: elias@omicron.se (Elias Martenson)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: fopen() with a UNIX path?
  5. Date: 4 Jan 1996 15:27:02 GMT
  6. Organization: Omicron
  7. Message-ID: <4cgrk6$47d@sargas.omicron.se>
  8. References: <4cflfs$1m@acmez.gatech.edu>
  9. NNTP-Posting-Host: graffias.omicron.se
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=US-ASCII
  12. Content-Transfer-Encoding: 7bit
  13. X-Newsreader: NN version 6.5.0 #2 (NOV)
  14.  
  15. gt1329a@prism.gatech.edu (David Ward) writes:
  16.  
  17. > Hey everyone. Does anyone know why something like this doesn't work?
  18.  
  19. >  if ( in = fopen ("~/.friends", "r")) == NULL )
  20.                    ^^^^^
  21. This is your problem. The ~-sign is expanded by the shell, not by
  22. UNIX itself. You must parse this yourself.
  23.  
  24. > The problem I'm having is that it won't find the file. If I put just
  25. >".friends" and run it in the same directory, it's fine... What am I doing
  26. >wrong?
  27.  
  28. > Thanks
  29. >   Dave
  30. >-- 
  31. >|David Ward                                  | '85 300ZX Turbo IZCC #451 |
  32. >|gt1329a@prism.gatech.edu  (404)206-9753     |  The Internet Z-Car Club  |
  33. >|http://www.cc.gatech.edu/people/home/davew/ |                           |
  34. >+--------------------------------------------+---------------------------+
  35. --
  36. Elias Martenson                            ! When I come up with a good joke,
  37. elias@omicron.se                           ! it will be here.
  38.